package com.zhiyou100.controller;

import java.util.List;

import javax.servlet.http.HttpSession;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.zhiyou100.model.Subject;
import com.zhiyou100.model.User;
import com.zhiyou100.service.SubjectService;

@Controller
@RequestMapping("/user/subject")
public class SubjectController {
	@Autowired
	private SubjectService ss;
	
	@RequestMapping("/index.do")
	public String manageSubject(Integer subjectId,HttpSession session) {
		Subject list = ss.selectSubjects(subjectId);

		session.setAttribute("subject", list);
		return "course/index";
	}
}
